package test1223;

public class Test02 {
    public static void main(String[] args) {
        // (2)打印5位数各个位的数字
        int value = 12345;
        int a = value % 10;
        int b = value % 100;
        b /= 10;
        int c = value % 1000;
        c /=100;
        int d = value % 10000;
        d /= 1000;
        int e = value % 100000;
        e /= 10000;


        System.out.println("万位数字: " + e);
        System.out.println("千位数字: " + d);
        System.out.println("百位数字: " + c);
        System.out.println("十位数字: " + b);
        System.out.println("个位数字: " + a);
    }
}
